﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DispatchAssist.BusinessLogical.Model
{
    public class EarlyWarning
    {

        /// <summary>
        /// EarlyWarning 构造函数
        /// </summary>
        public EarlyWarning()
        { }


        /// <summary>
        /// EarlyWarning OR映射构造函数
        /// </summary>
        public EarlyWarning(System.Data.IDataReader dr)
        {
            this.EarlyWarningID = (Guid)dr["EarlyWarningID"];
            this.Airport = Convert.ToString(dr["Airport"]);
            this.AOCEarlyTime = Convert.ToInt32(dr["AOCEarlyTime"]);
            this.SMSEarlyTime = Convert.ToInt32(dr["SMSEarlyTime"]);
            this.LastModifyTime = Convert.ToDateTime(dr["LastModifyTime"]);
            this.DeleteFlag = Convert.ToBoolean(dr["DeleteFlag"]);
        }


        /// <summary>
        /// 唯一标识
        /// </summary>
        public Guid EarlyWarningID { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public string Airport { get; set; }

        /// <summary>
        /// AOC告警提前时间
        /// </summary>
        public int AOCEarlyTime { get; set; }

        /// <summary>
        /// 短信告警提前时间
        /// </summary>
        public int SMSEarlyTime { get; set; }

        /// <summary>
        /// 最后修改时间
        /// </summary>
        public DateTime LastModifyTime { get; set; }

        /// <summary>
        /// 逻辑删除标记
        /// </summary>
        public bool DeleteFlag { get; set; }

        public override string ToString()
        {

            return string.Format("[机场编码:{0},AOC告警提前时间：{1},短信告警提前时间:{2}]", Airport, AOCEarlyTime, SMSEarlyTime);
        }
    }
}
